package cn.inbot.shopadmin.module.robot.repository;

import java.util.HashMap;

import cn.inbot.shopadmin.api.DemoApiFactory;
import cn.inbot.shopadmin.app.AppConfig;
import cn.inbot.shopadmin.bean.RobotVoListResult;
import cn.inbot.lib.network.BaseResponse;
import cn.inbot.lib.util.LocalUtil;
import io.reactivex.Observable;

/**
 * Created by shisenkun on 2021/5/11.
 */
public class RobotRepository {

    public Observable<RobotVoListResult> getRobotVoList(String username, String loginuuid) {
        HashMap<String, String> parameters = new HashMap();
        parameters.put("u", username);
        parameters.put("l", loginuuid);

        return DemoApiFactory.getInstance().getDemoApi().getRobotVoList(parameters);

    }

    public Observable<BaseResponse> saveGeTuiClientId(String userId, String getuiId) {
        HashMap<String, String> parameters = new HashMap();
        parameters.put("ui", userId);
        parameters.put("ci", getuiId);
        parameters.put("at", AppConfig.APP_TYPE);
        parameters.put("av", AppConfig.APP_VERSION);
        parameters.put("lg", LocalUtil.getCurrentLanguage());

        return DemoApiFactory.getInstance().getDemoApi().saveGeTuiClientId(parameters);

    }

}
